package com.exchange.View;

import android.app.AlertDialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager.LayoutParams;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.exchange.Public.ExchangeConstants;
import com.exchange.Public.f;
import com.exchange.Public.h;
import com.exchange.Public.m;
import com.exchange.View.a.a;
import com.exchange.View.a.b;
import com.exchange.b.a;

public class ad extends AlertDialog
{
  static int a;
  private Context b;
  private int c;

  public ad(Context paramContext, a parama, int paramInt1, int paramInt2, int paramInt3)
  {
    super(paramContext);
    this.b = paramContext;
    this.c = paramInt1;
    setInverseBackgroundForced(true);
    LayoutInflater localLayoutInflater = (LayoutInflater)this.b.getSystemService("layout_inflater");
    if (!(h.d(this.b)))
    {
      a = a.s(this.b);
      localView = localLayoutInflater.inflate(a, null);
      setView(localView, 0, 0, 0, 0);
      ((TextView)localView.findViewById(b.v(this.b))).setText(parama.a);
      ((TextView)localView.findViewById(b.t(this.b))).setText("开发：" + parama.u);
      ((TextView)localView.findViewById(b.u(this.b))).setText("名称：" + parama.g);
      localTextView = (TextView)localView.findViewById(b.p(this.b));
      if (!(ExchangeConstants.show_size))
        break label366;
      localTextView.setText(m.a(this.b, parama.n));
    }
    while (true)
    {
      while (true)
      {
        ((TextView)localView.findViewById(b.w(this.b))).setText(parama.b);
        ImageView localImageView = (ImageView)localView.findViewById(b.m(this.b));
        new f(this.b, localImageView, parama.e).start();
        ((Button)localView.findViewById(b.k(this.b))).setOnClickListener(new N(this, parama, paramInt2, paramInt3, paramInt1));
        ((Button)localView.findViewById(b.j(this.b))).setOnClickListener(new Q(this));
        WindowManager.LayoutParams localLayoutParams = getWindow().getAttributes();
        localLayoutParams.height = -1;
        getWindow().setAttributes(localLayoutParams);
        return;
        a = a.o(this.b);
      }
      label366: localTextView.setVisibility(8);
    }
  }

  int a(Context paramContext)
  {
    int i;
    switch (this.c)
    {
    case 2:
    case 3:
    default:
      i = 2;
    case 0:
    case 1:
    case 8:
    case 7:
    case 9:
    case 4:
    case 5:
    case 6:
    }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              while (true)
              {
                return i;
                i = 2;
              }
              i = 2;
            }
            i = 3;
          }
          i = 2;
        }
        i = 3;
      }
      i = 2;
    }
  }
}